﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using SharpGeometry;
using SharpGeometry.Basic;
using SharpGeometry.GeometryMath;

//TODO: Add comments.
//TODO: Add documentation tags.

namespace GeometryTest
{
    [TestClass]
    public class Vector2DTests
    {
        [TestMethod]
        public void TestVector2DLength()
        {
            Vector2D v = new Vector2D(15, 20);
            float res = v.Length();

            Assert.AreEqual(25.0f, res);
        }

        [TestMethod]
        public void TestVector2DNormalize()
        {
            Vector2D v = new Vector2D(2, 2);
            Vector2D res = v.Normalize();

            Assert.AreEqual(0.707107, Math.Round(res.X, 6));
            Assert.AreEqual(0.707107, Math.Round(res.Y, 6));
        }
    }
}
